<?php
//获取用户手机，以及openid
$openid = '';
if(isset($_GET['openid'])){
    $openid = $_GET['openid'];
}

$url =  $control->getAjaxScript('authUserInfo', array(
    'cooker' => 'BAMemberCard@authUser',
));
$model = new BDynamicFormModel();
$nameField = 'media_name_user_Info';
$mobileField = 'media_mobile_user_Info';
$openidField = 'media_openid_user_Info';

$model->addField($nameField);
$model->addField($mobileField);
$model->addField($openidField);
?>
<?php echo $control->renderView("header"); ?>
<style>
    .sub_card{
    width: 100%;
    color: #FFF;
    font-size: 18px;
    text-align: center;
    height: 40px;
    line-height: 40px;
    text-shadow: 0 -1px 1px rgba(0,0,0,.5);
    border-radius: 5px;
    background-color: #25b025;
    background-image: -webkit-gradient(linear,left top,left bottom,from(#39d139),to(#25b025));
    background-image: -webkit-linear-gradient(top,#39d139,#25b025);
    background-image: linear-gradient(to bottom,#39d139,#25b025);
    }
</style>
<div id="page_card" class="div-body">

    <div id="mappContainer">
        <div class="inner root" style="height: 519px;">
            <div class="card" style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/card_bk_1.png'?>) no-repeat 0 0;-webkit-background-size:267px 159px;background-size:267px 159px;" data-card-type="0">
                <img src="<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/weixin_shop_logo/2543529110_card_170_170.png'?>" class="logo">
                <h1></h1>
                <strong class="pdo verify"></strong>
            </div>

            <p><span>使用时向服务员出示此卡</span></p>

            <ul class="round" id="customs2" style="display: none;"></ul>

            <ul class="round" id="privates">
                <li style="background:url(<?php echo Yii::app()->request->baseUrl.'/images/BWeMember/wei_webapp_new/icon_balance.png'?>) no-repeat 9px 14px;-webkit-background-size:24px 21px;background-size:24px 21px;">
                    <a class="score" href="#" >请输入会员信息进行验证！<span hidden="">null</span><i hidden="">null</i></a>
                </li>
            </ul>
               <?php
                $form = $this->beginWidget('CActiveForm', array(
                    "id" => "auth-myInfo-form",
                    'enableAjaxValidation' => FALSE,
                   'htmlOptions' => array('class' => 'form-signin', 'role' => 'form'),
                ));
                ?>
            <ul class="round" id="customs">
                <li class="power">
                    <article>
                        <a href="#" style="height: 20px;">
                            <p>姓名：
                                <?php
                                echo CHtml::activeTextField($model, $nameField, array(
                                    'style' => 'border: none;-webkit-appearance: none;font-size: 14px;outline: none;',
                                    'placeholder' => '请输入姓名...',
                                    'required' => 'true'));
                                ?>
                            </p>
                        </a>
                    </article>
                </li>
                <li class="power">
                    <article>
                        <a href="#" style="height: 20px;">
                            <p>联系电话：
                            <?php
                                echo CHtml::activeTextField($model, $mobileField, array(
                                    'style' => 'border: none;-webkit-appearance: none;font-size: 14px;outline: none;',
                                    'placeholder' => '请输入联系电话...',
                                    'required' => 'true'));
                                ?>
                            </p>
                        </a>
                    </article>
                </li>
            <?php
                echo CHtml::activeTextField($model, $openidField, array(
                    'style'=>'display: none',
                    'placeholder' => 'openid',
                    'value'=>$openid,
                    'required' => 'true'));
                ?>
            </ul>
            
            <div><a id="submitBtn"  href="#" class="sub_card" onclick="<?php echo $url;?>">点击认证</a></div>
        <?php $this->endWidget(); ?>
        </div>
        <div class="footFix" id="modal"></div>
    </div>

    <?php echo $control->renderView("footer"); ?>

</div>
